package com.ww.springboot.boot.javabase.clazz;

import lombok.Data;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * 描述：创建对象
 *
 * @author 🧑 ‍wanwei
 * @since 2022-05-17 09:24
 */
@Data
public class CreateClass {


    private String ss;


    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
        Class<CreateClass> createClassClass = CreateClass.class;

        Constructor<CreateClass> constructor = createClassClass.getConstructor();

        CreateClass createClass = constructor.newInstance();

        System.out.println(createClass);
    }
}
